# $Id: PKGBUILD 87406 2013-03-31 19:18:09Z stephane $
# Maintainer: Sven-Hendrik Haase <sh@lutzhaase.com>
# Contributor: Juergen Hoetzel <juergen@archlinux.org> 
# Contributor: William Rea <sillywilly@gmail.com>, 
# Contributor: Bjorn Lindeijer <bjorn@lindeijer.nl>

pkgbase=cegui
pkgname=('cegui' 'cegui-docs')
pkgver=0.7.9
pkgrel=2
pkgdesc="A free library providing windowing and widgets for graphics APIs/engines"
arch=('i686' 'x86_64')
url="http://crayzedsgui.sourceforge.net"
#options=('!libtool')
license=("MIT")
depends=('pcre' 'glew' 'expat' 'freetype2' 'libxml2' 'devil' 'freeglut' 'lua51' 'silly')
makedepends=('python2' 'doxygen' 'ogre' 'gtk2' 'boost' 'graphviz')
optdepends=("python2: python bindings"
            "ogre: ogre module"
            "gtk2: gtk2 module")
            #"irrlicht: irrlicht module") maybe again at some point
options=(!libtool)
source=(http://downloads.sourceforge.net/crayzedsgui/CEGUI-$pkgver.tar.gz)
md5sums=('a8b682daf82e383edc169c2e6eb2b321')

build() {
  cd "$srcdir/CEGUI-${pkgver}"

  ./bootstrap

  ./configure --prefix=/usr \
    --sysconfdir=/etc \
    --enable-null-renderer \
    --with-gtk2

  make
}

package_cegui() {
  cd "$srcdir/CEGUI-${pkgver}"
 
  make DESTDIR="${pkgdir}" install

  install -Dm644 doc/COPYING "${pkgdir}/usr/share/licenses/$pkgname/LICENSE"
}

package_cegui-docs() {
  pkgdesc="Documentation for cegui"
  depends=()

  cd "$srcdir/CEGUI-${pkgver}"

  cd doc/doxygen && doxygen
  cd .. && make DESTDIR="${pkgdir}" install-html
  install -Dm644 COPYING "${pkgdir}/usr/share/licenses/$pkgname/LICENSE"
}
